//
//  ProtolViewController.m
//  壳牌喜力促销积分商城
//
//  Created by TUSM on 15/3/20.
//  Copyright (c) 2015年 xrd. All rights reserved.
//

#import "ProtolViewController.h"
#define userIsAgreenProtol @"userIsAgreenProtol"
@interface ProtolViewController ()

@end

@implementation ProtolViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
// 同意
- (IBAction)agreenBtnDidClick:(id)sender {
    NSUserDefaults *userDefaults= [NSUserDefaults standardUserDefaults];
    [userDefaults setObject:@(1) forKey:userIsAgreenProtol];
    [userDefaults synchronize];
    UIWindow *window = [UIApplication sharedApplication ].keyWindow;
    UIStoryboard *sb = [UIStoryboard storyboardWithName:@"TwoMain" bundle:nil];
    window.rootViewController = sb.instantiateInitialViewController;
}
// 拒绝
- (IBAction)cancelBtnDidClick:(id)sender {
    UIWindow *window = [UIApplication sharedApplication ].keyWindow;
    UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    window.rootViewController = sb.instantiateInitialViewController;
}


@end
